import Vue from 'vue'
import Router from 'vue-router'
 
import Main from '../views/Main';
import Login from '../views/Login';
import LoginTest from '../views/LoginTest';

import Blog from '../components/blog';
import TestA from '../components/test';

import Edit from '../components/edit';
import Detail from '../components/details';

import BlogTimeline from '../components/BlogTimeline';
import BlogTag from '../components/BlogTag';
import Register from '../views/Register';

import Setting from '../components/setting';
import Upload from '../components/upload';

import Essay from '../components/essay';
import Archive from '../components/archive';
import Guestbook from '../components/guestbook';

Vue.use(Router);

export default new Router({
	// mode: 'history',
	// base:'/vue/',
	routes:[
		{
			path: '/main',
			component: Main,
			children: [
				{
					path: 'blog',
					name: 'blog',
					component: Blog,
				},
				{
					path: 'login',
					name: 'login',
					component: Login,
				},
				{
					path: 'logintest',
					name: 'logintest',
					component: LoginTest,
				},
				{
					path: 'register',
					name: 'register',
					component: Register,
				},
				{
					path: 'edit',
					name: 'edit',
					component: Edit,
				},
				{
					path: 'detail',
					name: 'detail',
					component: Detail,
				},
				{
					path: 'blogtimeline',
					name: 'blogtimeline',
					component: BlogTimeline,
				},
				{
					path: 'blogtag',
					name: 'blogtag',
					component: BlogTag,
				},
				{
					path: 'setting',
					name: 'setting',
					component: Setting,
				},
				{
					path: 'upload',
					name: 'upload',
					component: Upload,
				},
				{
					path: 'essay',
					name: 'essay',
					component: Essay,
				},
				{
					path: 'archive',
					name: 'archive',
					component: Archive,
				},
				{
					path: 'guestbook',
					name: 'guestbook',
					component: Guestbook,
				}

			]
		},
		{
			path: '/',
			component: Main,
			children: [
				{
					path: '/',
					name: '/blog',
					component: Blog,
				},
			]
		},
		// {
		// 	path: '/login',
		// 	component: Login
		// },
		// {
		// 	path: '/logintest',
		// 	component: LoginTest
		// },
		// {
		// 	path: '/blog',
		// 	component: Blog
		// },
		// {
		// 	path: '/test',
		// 	component: TestA
		// },
		// {
		// 	path: '/edit',
		// 	component: Edit
		// },
		// {
		// 	path: '/detail',
		// 	component: Detail,
		// },
		// {
		// 	path: '/blogtimeline',
		// 	component: BlogTimeline,
		// },
		// {
		// 	path: '/blogtag',
		// 	component: BlogTag,
		// },
		// {
		// 	path: '/register',
		// 	component: Register,
		// },
		// {
		// 	path: '/setting',
		// 	component: Setting,
		// },
		// {
		// 	path: '/upload',
		// 	component: Upload,
		// }


	]
});
